@extends('layouts.ajax_master')
@section('app_js')
    <script type="text/javascript" src="/resource/js/J_main.js"></script>
    <script type="text/javascript">
        $('#teamTable').dataTable().fnDestroy();
        initDataTables();
    </script>
@stop
@section('content')
    <table id="example" class="table table-striped responsive-utilities jambo_table">
        <thead>
        <tr class="headings">
            <th>
                <input type="checkbox" class="tableflat">
            </th>
            <th>编号</th>
            <th>品名</th>
            <th>材质</th>
            <th>规格</th>
            <th>单价</th>
            <th>件重(吨)</th>
            <th>锁定库存</th>
            <th>可用库存</th>
            <th>实际库存</th>
            <th>添加人</th>
            <th>负责人</th>
            <th>状态</th>
            <th class=" no-link last"><span class="nobr">操作</span>
            </th>
        </tr>
        </thead>

        <tbody>
        @foreach($product_list as $k => $p)
            <tr class="even pointer img-box">
                <td class="a-center ">
                    <input type="checkbox" class="tableflat">
                </td>
                <td class=" ">{{$p->product_id}}</td>
                <td class="">
                    <span>{{$p->brand_name}}</span>
                </td>
                <td class="">{{$p->m_name}}</td>
                <td class=" ">{{$p->product_spec}}</td>
                <td class=" ">{{$p->product_price}}</td>
                <td class=" ">{{$p->piece_weight}}</td>
                <td class=" ">{{$p->locking_stock}}/件</td>
                <td class=" ">{{$p->useable_stock}}/件</td>
                <td class=" ">{{$p->real_stock}}/件</td>
                <td class=" ">{{$p->add_people}}</td>
                <td class=" ">{{$p->duty_people}}</td>
                <td class=" "><select class="update" name="status" data-product_id="{{ $p->product_id }}">@foreach(ProductEnum::$examine_role as $k=>$v)<option value="{{$k}}" @if($p->status==$k)selected="selected" @endif>{{$v}}</option>@endforeach</select></td>
                <td class=" last">
                    <a href="/admin/product_import?product_id={{ $p->product_id }}">编辑</a>
                    <a href="javascript:;"  class="delete"  data-product_id="{{ $p->product_id }}">删除</a>
                </td>
            </tr>
        @endforeach
        </tbody>

    </table>
@stop